package work20241202_chap5oop.e_oop;

/**
 * @author zdl
 * @date 2024/12/2
 */
class ClassA {
    int value;//10
}

public class Demo8 {
    public static void main(String args[]) {
        int value = 10;
        changeInt(value);
        System.out.println(value);//10
        ClassA ca = new ClassA();
        ca.value = 10;
        changeObject(ca);
        System.out.println(ca.value);//11
    }

    public static void changeInt(int value) {
        value++;
    }

    public static void changeObject(ClassA ca) {
        ca.value++;
    }
}
